package is.glif.fenius.webui.db.bean;


import org.apache.commons.lang.builder.EqualsBuilder;

import is.glif.fenius.webui.db.HibernateBean;

public class Component extends HibernateBean {
    private static final long serialVersionUID = 1L;
    private String networkId;
    private String endpointA;
    private String endpointZ;
    
    private String reservationId;
    private CompositeReservation compositeReservation;
    
    public String getNetworkId() {
        return networkId;
    }
    public void setNetworkId(String networkId) {
        this.networkId = networkId;
    }
    public String getReservationId() {
        return reservationId;
    }
    public void setReservationId(String reservationId) {
        this.reservationId = reservationId;
    }
    public void setCompositeReservation(CompositeReservation compositeReservation) {
        this.compositeReservation = compositeReservation;
    }
    public CompositeReservation getCompositeReservation() {
        return compositeReservation;
    }
    
    @SuppressWarnings("rawtypes")
    public boolean equals(Object o) {
        if (this == o) { return true; }
        Class thisClass = getClass();
        if (o == null || thisClass != o.getClass()) {
            return false;
        }
        Component other = (Component) o;
        return new EqualsBuilder()
            .append(this.getId(), other.getId())
            .append(this.getNetworkId(), other.getNetworkId())
            .append(this.getReservationId(), other.getReservationId())
                .isEquals();
        }
    public void setEndpointA(String endpointA) {
        this.endpointA = endpointA;
    }
    public String getEndpointA() {
        return endpointA;
    }
    public void setEndpointZ(String endpointZ) {
        this.endpointZ = endpointZ;
    }
    public String getEndpointZ() {
        return endpointZ;
    }

}
